using System;
namespace HomeWork
{

    //重写函数
   public class WorkMonster
    {
        public int lv;

        public virtual void Attack()
        {

            Console.WriteLine("You Creat a A");

        }
    }


    public class WorkBoss:WorkMonster 
    {

        public override void Attack()
        {
            Console.WriteLine("You Creat a Boss!");
            base.Attack();
        }

        
    }

    //设置变量

    public class Worker2Monster
    {
        public int lv = 10;
        public string name;

        public int SetLevel
        {
            get { return lv; }
            set {lv= value;}
        }

        public string SetName
        {
            get { return name; }
            set { name = value; }
        }


    }

    
    //接口

    public class Drink
    {

    }

    public class Milk:Drink,IAddSuger
    {
        public void AddSuger()
        {
            Console.WriteLine("Mlik add Suger Success!");
        }
    }

    public class Water:Drink,IAddSuger,IAddSolt
    {
        public void AddSuger()
    {
            Console.WriteLine("Water add Suger Success");

    }
        public void AddSolt()
    {
            Console.WriteLine("Water add Solt Success");

    }

    }

    public class Soup:Drink,IAddSolt
    {

        public void AddSolt()
    {
            Console.WriteLine("Soup add Solt Success");
    }
    }

    public  interface IAddSuger
    {
        void AddSuger();
    }
    public interface IAddSolt
    {
        void AddSolt();
    }










}

